Optimal. Leaf size=119 \[ \frac {d e^{a+b x} \sin (c+d x)}{4 \left (b^2+d^2\right )}-\frac {3 d e^{a+b x} \sin (3 c+3 d x)}{4 \left (b^2+9 d^2\right )}+\frac {b e^{a+b x} \cos (c+d x)}{4 \left (b^2+d^2\right )}-\frac {b e^{a+b x} \cos (3 c+3 d x)}{4 \left (b^2+9 d^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {4469, 4433} \[ \frac {d e^{a+b x} \sin (c+d x)}{4 \left (b^2+d^2\right )}-\frac {3 d e^{a+b x} \sin (3 c+3 d x)}{4 \left (b^2+9 d^2\right )}+\frac {b e^{a+b x} \cos (c+d x)}{4 \left (b^2+d^2\right )}-\frac {b e^{a+b x} \cos (3 c+3 d x)}{4 \left (b^2+9 d^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4433
Rule 4469
Rubi steps
\begin {align*} \int e^{a+b x} \cos (c+d x) \sin ^2(c+d x) \, dx &=\int \left (\frac {1}{4} e^{a+b x} \cos (c+d x)-\frac {1}{4} e^{a+b x} \cos (3 c+3 d x)\right ) \, dx\\ &=\frac {1}{4} \int e^{a+b x} \cos (c+d x) \, dx-\frac {1}{4} \int e^{a+b x} \cos (3 c+3 d x) \, dx\\ &=\frac {b e^{a+b x} \cos (c+d x)}{4 \left (b^2+d^2\right )}-\frac {b e^{a+b x} \cos (3 c+3 d x)}{4 \left (b^2+9 d^2\right )}+\frac {d e^{a+b x} \sin (c+d x)}{4 \left (b^2+d^2\right )}-\frac {3 d e^{a+b x} \sin (3 c+3 d x)}{4 \left (b^2+9 d^2\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.66, size = 74, normalized size = 0.62 \[ \frac {1}{4} e^{a+b x} \left (\frac {b \cos (c+d x)+d \sin (c+d x)}{b^2+d^2}-\frac {b \cos (3 (c+d x))+3 d \sin (3 (c+d x))}{b^2+9 d^2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.57, size = 109, normalized size = 0.92 \[ \frac {{\left (b^{2} d + 3 \, d^{3} - 3 \, {\left (b^{2} d + d^{3}\right )} \cos \left (d x + c\right )^{2}\right )} e^{\left (b x + a\right )} \sin \left (d x + c\right ) - {\left ({\left (b^{3} + b d^{2}\right )} \cos \left (d x + c\right )^{3} - {\left (b^{3} + 3 \, b d^{2}\right )} \cos \left (d x + c\right )\right )} e^{\left (b x + a\right )}}{b^{4} + 10 \, b^{2} d^{2} + 9 \, d^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 98, normalized size = 0.82 \[ -\frac {1}{4} \, {\left (\frac {b \cos \left (3 \, d x + 3 \, c\right )}{b^{2} + 9 \, d^{2}} + \frac {3 \, d \sin \left (3 \, d x + 3 \, c\right )}{b^{2} + 9 \, d^{2}}\right )} e^{\left (b x + a\right )} + \frac {1}{4} \, {\left (\frac {b \cos \left (d x + c\right )}{b^{2} + d^{2}} + \frac {d \sin \left (d x + c\right )}{b^{2} + d^{2}}\right )} e^{\left (b x + a\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.16, size = 108, normalized size = 0.91 \[ \frac {b \,{\mathrm e}^{b x +a} \cos \left (d x +c \right )}{4 b^{2}+4 d^{2}}-\frac {b \,{\mathrm e}^{b x +a} \cos \left (3 d x +3 c \right )}{4 \left (b^{2}+9 d^{2}\right )}+\frac {d \,{\mathrm e}^{b x +a} \sin \left (d x +c \right )}{4 b^{2}+4 d^{2}}-\frac {3 d \,{\mathrm e}^{b x +a} \sin \left (3 d x +3 c \right )}{4 \left (b^{2}+9 d^{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.35, size = 538, normalized size = 4.52 \[ -\frac {{\left (b^{3} \cos \left (3 \, c\right ) e^{a} + b d^{2} \cos \left (3 \, c\right ) e^{a} + 3 \, b^{2} d e^{a} \sin \left (3 \, c\right ) + 3 \, d^{3} e^{a} \sin \left (3 \, c\right )\right )} \cos \left (3 \, d x\right ) e^{\left (b x\right )} + {\left (b^{3} \cos \left (3 \, c\right ) e^{a} + b d^{2} \cos \left (3 \, c\right ) e^{a} - 3 \, b^{2} d e^{a} \sin \left (3 \, c\right ) - 3 \, d^{3} e^{a} \sin \left (3 \, c\right )\right )} \cos \left (3 \, d x + 6 \, c\right ) e^{\left (b x\right )} - {\left (b^{3} \cos \left (3 \, c\right ) e^{a} + 9 \, b d^{2} \cos \left (3 \, c\right ) e^{a} - b^{2} d e^{a} \sin \left (3 \, c\right ) - 9 \, d^{3} e^{a} \sin \left (3 \, c\right )\right )} \cos \left (d x + 4 \, c\right ) e^{\left (b x\right )} - {\left (b^{3} \cos \left (3 \, c\right ) e^{a} + 9 \, b d^{2} \cos \left (3 \, c\right ) e^{a} + b^{2} d e^{a} \sin \left (3 \, c\right ) + 9 \, d^{3} e^{a} \sin \left (3 \, c\right )\right )} \cos \left (d x - 2 \, c\right ) e^{\left (b x\right )} + {\left (3 \, b^{2} d \cos \left (3 \, c\right ) e^{a} + 3 \, d^{3} \cos \left (3 \, c\right ) e^{a} - b^{3} e^{a} \sin \left (3 \, c\right ) - b d^{2} e^{a} \sin \left (3 \, c\right )\right )} e^{\left (b x\right )} \sin \left (3 \, d x\right ) + {\left (3 \, b^{2} d \cos \left (3 \, c\right ) e^{a} + 3 \, d^{3} \cos \left (3 \, c\right ) e^{a} + b^{3} e^{a} \sin \left (3 \, c\right ) + b d^{2} e^{a} \sin \left (3 \, c\right )\right )} e^{\left (b x\right )} \sin \left (3 \, d x + 6 \, c\right ) - {\left (b^{2} d \cos \left (3 \, c\right ) e^{a} + 9 \, d^{3} \cos \left (3 \, c\right ) e^{a} + b^{3} e^{a} \sin \left (3 \, c\right ) + 9 \, b d^{2} e^{a} \sin \left (3 \, c\right )\right )} e^{\left (b x\right )} \sin \left (d x + 4 \, c\right ) - {\left (b^{2} d \cos \left (3 \, c\right ) e^{a} + 9 \, d^{3} \cos \left (3 \, c\right ) e^{a} - b^{3} e^{a} \sin \left (3 \, c\right ) - 9 \, b d^{2} e^{a} \sin \left (3 \, c\right )\right )} e^{\left (b x\right )} \sin \left (d x - 2 \, c\right )}{8 \, {\left (b^{4} \cos \left (3 \, c\right )^{2} + b^{4} \sin \left (3 \, c\right )^{2} + 9 \, {\left (\cos \left (3 \, c\right )^{2} + \sin \left (3 \, c\right )^{2}\right )} d^{4} + 10 \, {\left (b^{2} \cos \left (3 \, c\right )^{2} + b^{2} \sin \left (3 \, c\right )^{2}\right )} d^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.01, size = 166, normalized size = 1.39 \[ \frac {{\mathrm {e}}^{a+b\,x}\,\left (\cos \left (d\,x\right )-\sin \left (d\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \relax (c)-\sin \relax (c)\,1{}\mathrm {i}\right )}{8\,\left (b-d\,1{}\mathrm {i}\right )}-\frac {{\mathrm {e}}^{a+b\,x}\,\left (\cos \left (3\,d\,x\right )+\sin \left (3\,d\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \left (3\,c\right )+\sin \left (3\,c\right )\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{8\,\left (-3\,d+b\,1{}\mathrm {i}\right )}+\frac {{\mathrm {e}}^{a+b\,x}\,\left (\cos \left (d\,x\right )+\sin \left (d\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \relax (c)+\sin \relax (c)\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{8\,\left (-d+b\,1{}\mathrm {i}\right )}-\frac {{\mathrm {e}}^{a+b\,x}\,\left (\cos \left (3\,d\,x\right )-\sin \left (3\,d\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \left (3\,c\right )-\sin \left (3\,c\right )\,1{}\mathrm {i}\right )}{8\,\left (b-d\,3{}\mathrm {i}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 44.43, size = 1030, normalized size = 8.66 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________